<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        .outer {
            width: 400px;
            height: 224px;
            position: relative;
            overflow: hidden;
            cursor: pointer;
        }
        img {
            transition:1s ease;
        }
        .mask {
            width: 400px;
            height: 224px;
            background-color: black;
            color: white;
            font-size: 100px;
            line-height: 224px;
            text-align: center;
            position: absolute;
            top: 0;
            left: 0;
            opacity: 0;
            transition: 1s linear;
        }
        .outer:hover .mask{
            opacity: 0.5;
        }
        .outer:hover img{
            transform: scale(1.8) rotate(30deg);
        }
    </style>
</head>
<body>
    <div class="outer">
        <img src="./images/shanghai.jpg" alt="上海">
        <div class="mask">上海</div>
    </div>
</body>
</html>